import Vue from 'vue'
import VueRouter from 'vue-router'
import GuaHao from '../views/GuaHao.vue'
import GhView from '../components/GhView.vue'
import ThView from '../components/ThView.vue'
import SysView from '../views/sys/SysView.vue'
import DeptView from '../components/DeptView.vue'
import EmpView from '../components/sys/EmpView.vue'
import FileUploadView from '../components/sys/FileUploadView.vue'
import LoginView from '../components/sys/LoginView.vue'
import EmployeeView from '../components/sys/EmployeeView.vue'
import TreeView from '../components/sys/TreeView.vue'
import RoleView from '../components/sys/RoleView.vue'
Vue.use(VueRouter)
const routes = [{
  path: '/',
  name: 'LoginView',
  component: LoginView
}, {
  path: '/ys',
  name: 'MzysVue',
  component: () => import('../views/mzys/MzysVue.vue'),
  children: [{
    path: '/ys/blsy',
    name: 'BlsyVue',
    component: () => import('../views/mzys/components/BlsyVue.vue')
  }, {
    path: '/ys/jcsq',
    name: 'JcsqVue',
    component: () => import('../views/mzys/components/JcsqVue.vue')
  }, {
    path: '/ys/jysq',
    name: 'JysqVue',
    component: () => import('../views/mzys/components/JysqVue.vue')
  }]
}, {
  path: '/sys',
  name: 'SysView',
  component: SysView,
  children: [{
    path: '/sys/m',
    name: 'MenuView',
    component: () => import('../components/sys/MenuView.vue')
  }, {
    path: '/sys/tr',
    name: 'TransferVue',
    component: () => import('../components/sys/TransferVue.vue')
  }, {
    path: '/sys/item',
    name: 'ItemizeVue',
    component: () => import('../components/sys/ItemizeVue.vue')
  }, {
    path: '/sys/rv',
    name: 'RoleView',
    component: RoleView
  }, {
    path: '/sys/tv',
    name: 'TreeView',
    component: TreeView
  }, {
    path: '/sys/empe',
    name: 'EmployeeView',
    component: EmployeeView
  }, {
    path: '/sys/dept',
    name: 'DeptView',
    component: DeptView
  }, {
    path: '/sys/emp',
    name: 'EmpView',
    component: EmpView
  }, {
    path: '/sys/fu',
    name: 'FileUploadView',
    component: FileUploadView
  }]
}, {
  path: '/guahao',
  name: 'GuaHao',
  component: GuaHao,
  children: [{
    path: '/guahao/ghview',
    name: 'GhView',
    component: GhView
  }, {
    path: '/guahao/thview',
    name: 'ThView',
    component: ThView
  }]
}]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
export default router
